package cn.scw.project.goods.service;

import cn.scw.project.goods.domain.GOrderCommodity;
import cn.scw.project.goods.domain.netework.bean.GOrderCommodityListReq;
import cn.scw.project.goods.domain.vo.GOrderCommodityVo;

import java.util.List;

/**
 * 订单商品Service接口
 *
 * @author api
 * @date 2020-05-20
 */
public interface IGOrderCommodityService
{
    /**
     * 查询订单商品
     *
     * @param id 订单商品ID
     * @return 订单商品
     */
    public GOrderCommodity selectGOrderCommodityById(Long id);

    public GOrderCommodityVo selectGOrderCommodityVoById(Long id);


    /**
     * 查询订单商品列表
     *
     * @param req 订单商品
     * @return 订单商品集合
     */
    public List<GOrderCommodityVo> selectGOrderCommodityList(GOrderCommodityListReq req);

    List<GOrderCommodityVo> selectGOrderCommodityVoListByOrder(Long orderId);

    /**
     * 新增订单商品
     *
     * @param gOrderCommodity 订单商品
     * @return 结果
     */
    public int insertGOrderCommodity(GOrderCommodity gOrderCommodity);

    /**
     * 修改订单商品
     *
     * @param gOrderCommodity 订单商品
     * @return 结果
     */
    public int updateGOrderCommodity(GOrderCommodity gOrderCommodity);

    /**
     * 批量删除订单商品
     *
     * @param ids 需要删除的订单商品ID
     * @return 结果
     */
    public int deleteGOrderCommodityByIds(Long[] ids);

    /**
     * 删除订单商品信息
     *
     * @param id 订单商品ID
     * @return 结果
     */
    public int deleteGOrderCommodityById(Long id);

    int countByUserAndRent(Long userId, String purchasingTypes);
}
